import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

import NotFound from '@/pages/home/notFound'
import Empty from '@/pages/home/notFound/empty'
import mediaEditor from '@/pages/mediaRecorder'
export type RouterType = RouteRecordRaw & { chname?: string; children?: any }

//菜单

export const routes: RouteRecordRaw[] = [
  {
    name: 'hoom', // 老师端
    path: '/',
    component: mediaEditor,
  },
  {
    name: 'notFound',
    path: '/:pathMatch(.*)*',
    component: NotFound,
  },
]

export const router = createRouter({
  history: createWebHashHistory(),
  // history: createWebHashHistory(import.meta.env.BASE_URL), // es2019编译目标下import.env不支持
  routes,
})

export default router
